<script setup>
import router from '@/router'
</script>

<template>
  <div @click="router.push('/')" class="return"><span>&lt;</span>&nbsp;&nbsp;返回</div>
</template>

<style scoped lang="scss">
.return {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  cursor: pointer;
  background-color: var(--theme-color);
  transition: all 0.3s ease;

  &:hover {
    background-color: var(--btn-hover-color);
  }

  span {
    display: block;
  }
  &:hover {
    span {
      animation: bg 1.5s ease;
    }
  }
}
@keyframes bg {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px) scale(1);
  }
  50% {
    transform: translateX(0) scale(1);
  }
}
</style>
